{include file="public/head"}
<style>
    .loginFrom{
        width: 100%;
        margin-top: 3rem;
        padding: .5rem .2rem;
        text-align: center;
    }

    .loginFrom input{
        width: 90%;
        height: 3rem;
        line-height: 3rem;
        outline: none;
        border: none;
        border-bottom: 1px #f0f0f0 solid;
    }

    .login{
        background-color: #FF4000;
        border-radius: .1rem;
        font-weight: 600;
        color:white;
        margin: 2rem 0 1rem 0;
    }

    .operation{
        width: 100%;
        padding: 0rem 1.5rem;
    }

    .operation .left{
        float: left;
    }

    .operation .right{
        float: right;
    }

</style>
<body>
<header class="aui-header-default aui-header-fixed aui-header-bg">
    <a href="javascript:history.back(-1)" class="aui-header-item">
        <i class="aui-icon aui-icon-back-white"></i>
    </a>
    <div class="aui-header-center aui-header-center-clear">
        <div class="aui-header-center-logo">
            <div class="aui-car-white-Typeface">用户登录</div>
        </div>
    </div>
    <a href="#" class="aui-header-item-icon"   style="min-width:0">
        <i class="aui-icon aui-icon-search"></i>
    </a>
</header>

<div class="aui-content-box">
    <div class="aui-banner-content aui-fixed-top" data-aui-slider>
        <div class="aui-banner-wrapper">
            {volist name="BannerList" id="v"}
            <div class="aui-banner-wrapper-item">
                <a href="#">
                    <img src="{$v.url}">
                </a>
            </div>
            {/volist}
        </div>
        <div class="aui-banner-pagination"></div>
    </div>
    <div class="loginFrom">
        <input type="text" id="username" placeholder="请输入用户名">
        <input type="password" id="password_login" placeholder="请输入密码">
        <input type="submit" class="login" value="登录">
    </div>
    <div class="operation">
        <div class="left"><a href="register.html">立即注册</a></div>
        <div class="right"><a href="findpass.html">忘记密码</a></div>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/User/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/User/js/aui.js"></script>
<script>
    $(function(){
        $(".login").on("click",function(){

            $.ajax({

                type:"POST",

                url:"{:url('Open/Login')}",

                data:{

                    username:$("#username").val(),

                    password_login:$("#password_login").val(),

                },

                dataType:"json",

                success:function(data){

                    if(data.status == 1){

                        alert(data.message);

                        window.location.href="{:url('Index/App')}";

                    }else{

                        alert(data.message);

                    }

                }

            })
        })
    })
</script>
</body>
</html>